﻿using Calligraphy.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace CalligraphyWeb.Models
{
    [Serializable]
    public class EditorModel
    {
        public item Item { get; set; }
        [JsonIgnore]
        public ObservableCollection<fontFamily> FontFamilies { get; set; }
        [JsonIgnore]
        public List<SelectListItem> FontFamiliesList { get; set; }
        public ObservableCollection<item> Items { get; set; }
        public ObservableCollection<template> Templates { get; set; }
        public ObservableCollection<gallery> Galleries { get; set; }
        public ObservableCollection<gallery> CommonGalleries { get; set; }
        public int TemplateID { get; set; }

        public EditorModel()
        {
            Item = new item();
            FontFamilies = new ObservableCollection<fontFamily>();
            FontFamiliesList = new List<SelectListItem>();
            Items = new ObservableCollection<item>();
            Templates = new ObservableCollection<template>();
            Galleries = new ObservableCollection<gallery>();
            CommonGalleries = new ObservableCollection<gallery>();
            TemplateID = 0;
        }
    }

    [Serializable]
    public class EditorQueryData
    {
        public int id { set; get; }
        public string type { set; get; }
    }

    [Serializable]
    public class SaveTemplateModel {
        public item Item { get; set; }
        public int id { get; set; }
        public string name { get; set; }
        public string description { get; set; }
        public double Ratio { get; set; }
    }

    [Serializable]
    public class SaveItemModel
    {
        public item Item { get; set; }
        public double Ratio { get; set; }
    }

    [Serializable]
    public class DownloadImageResult
    {
        public gallery Gallery { get; set; }
        public int Status = 0;
    }
}